#ifndef UNI_EDGE_HPP
#define UNI_EDGE_HPP

#include "structEdgeBase.hpp"
#include "rectNormalsType.hpp"

namespace hms {


template<>
class EdgeTraits<UniEdge> : public StructEdgeTraits
{
public:
	using MeshType     = UniMesh;
	// using NormalVector = Eigen::DenseBase<RectNormalsType>::ColXpr;
	using NormalVector = Vector2s;
};


class UniEdge : public StructEdgeBase<UniEdge>
{
public:
	using Traits = EdgeTraits<UniEdge>;
	using NormalVector = Traits::NormalVector;

private:
	UniEdge( const UniMesh&, Index );
	
	auto normalImp      () const -> NormalVector;
	auto lengthImp      () const -> scalar;
	auto midpointImp    () const -> Vector2s;
	auto intersectionImp() const -> Vector2s;
	
	friend EdgeBase;
	friend StructMeshBase<UniMesh>;
};


} // end namespace hms

#endif